<?php

// namespace declaration: Core Templates
namespace teia\webdev\php\core;

// define displayble text values, if undefined
if (!isset($action)) $action = 'passwordhelp.php';
if (!isset($method)) $method = 'POST';

if (!isset($header_txt)) $header_txt = 'Reset password';

if (!isset($email_txt)) $email_txt = 'E-mail';

if (!isset($submit_txt)) $submit_txt = 'Submit';

if (!isset($pub_key)) $pub_key = RECAPTCHA_PUB_KEY;

// customization
if (!isset($lang)) $lang = 'pt';
if (!isset($theme)) $theme = 'red';

if (!isset($recaptcha_err)) $recaptcha_err = null;

?>

<!-- Display password reset request form -->
<div id="usr_pwd_req_form">
	<script type="text/javascript">
		var RecaptchaOptions = {
   			lang : <?php echo $lang; ?>,
   			theme :  <?php echo $theme; ?>
		};
	</script>
	<form class="pwd_req_form" method="<?php echo $method; ?>" action="<?php echo $action; ?>">
		<fieldset class="form_fieldset">
			<legend><?php echo $header_txt; ?></legend>
			<input type="hidden" name="form_name" value="pwd_req_form" />
			<p class="input_txt">
				<?php FunctionPool::display_recaptcha($pub_key, $recaptcha_err); ?>
			</p>
			<p class="input_txt">
				<label class="input_label" for="pwd_email_input"> <?php echo $email_txt; ?>:</label> 
				<input class="input_field" id="pwd_email_input" type="email" name="email" required="required" />
			</p>
			<p class="pwd_req_submit">
				<input type="submit" name="submit" value="<?php echo $submit_txt; ?>" />
			</p>
		</fieldset>
	</form>
</div>